package com.xyrl.project.common.csr.vo;

import com.xyrl.project.common.store.enu.StoreType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

/**
 * @className CsrApplyVo
 * @company 星纭融链科技服务有限公司
 * @author 徐恩源
 * @version 1.0
 * @date 2020-01-05 14:26:59
 * @Description 申请成为商户（进货商、供货商）
 */
@Data
public class CsrApplyVo {
    @ApiModelProperty(value = "手机号")
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[0-9]{10}$", message = "请输入正确的手机号码")
    private String mobile;

    @ApiModelProperty(value = "真实姓名")
    @NotBlank(message = "真实姓名不能为空")
    @Length(min = 1, max =10, message = "真实姓名必须在{min}~{max}字符之间")
    private String name;

    @ApiModelProperty(value = "商户类型(seller 批发商，buyer 进货商，all 批发商/进行商一体）")
    @NotNull(message = "商户类型不能为空")
    private StoreType storeType;


    @ApiModelProperty(value = "所在省份编码")
    @NotBlank(message = "所在省份编码不能为空")
    private String provinceCode;

    @ApiModelProperty(value = "所在省份名称")
    @NotBlank(message = "所在省份名称不能为空")
    @Length(min = 1, max =64, message = "所在省份名称必须在{min}~{max}字符之间")
    private String provinceName;

    @ApiModelProperty(value = "所在城市编码")
    @NotBlank(message = "所在城市编码不能为空")
    private String cityCode;

    @ApiModelProperty(value = "所在城市名称")
    @NotBlank(message = "所在城市名称不能为空")
    @Length(min = 1, max =64, message = "所在城市名称必须在{min}~{max}字符之间")
    private String cityName;


    @ApiModelProperty(value = "所在区域编码")
    @NotBlank(message = "所在区域编码不能为空")
    private String areaCode;

    @ApiModelProperty(value = "所在区域名称")
    @NotBlank(message = "所在区域名称不能为空")
    @Length(min = 1, max =64, message = "所在区域名称必须在{min}~{max}字符之间")
    private String areaName;

    @ApiModelProperty(value = "地址")
    @NotBlank(message = "地址不能为空")
    @Length(min = 1, max =50, message = "地址必须在{min}~{max}字符之间")
    private String address;

    @ApiModelProperty(value = "经度")
    private BigDecimal lon;

    @ApiModelProperty(value = "纬度")
    private BigDecimal lat;
}
